<?php namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * App\Fields
 *
 * @property integer $id
 * @property string $field
 * @method static \Illuminate\Database\Query\Builder|\App\Fields whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Fields whereField($value)
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Org[] $org
 * @property string $deleted_at
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @method static \Illuminate\Database\Query\Builder|\App\Fields whereDeletedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Fields whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Fields whereUpdatedAt($value)
 */
class Fields extends Model
{
    protected $table = 'fields' ;
    use SoftDeletes;

    public function org(){
        return $this->belongsToMany('App\Org','org_x_field','field_id','org_id');
    }
}